package com.gxuwz.business.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gxuwz.business.service.ISysRightService;
import com.gxuwz.business.dao.impl.SysRightDAO;
import com.gxuwz.business.entity.SysRight;
import com.gxuwz.business.entity.SysRole;
import com.sun.mail.imap.Rights.Right;

@Service("sysRightService")
public class SysRightServiceImpl implements ISysRightService {
	@Autowired
  private SysRightDAO sysRightDAO;
	
	
	/**
	 * 添加权限
	 */
	
	public void add(SysRight sysRight) {
	
		sysRightDAO.save(sysRight);
	}

	@Override
	public void delete(SysRight sysRight) {
		
		sysRightDAO.delete(sysRight);
		
	}

	@Override
	public SysRight findById(String rightId) {
		// TODO Auto-generated method stub
		return sysRightDAO.get(SysRight.class,rightId);
	}

	@Override
	public List<SysRight> getRightAll() {
		return sysRightDAO.getAll(SysRight.class);
	}

	@Override
	public void update(SysRight sysRight) {
		// TODO Auto-generated method stub
		sysRightDAO.update(sysRight);
	}

	

	

}
